//////////////////////////////////////////////////////////////////////////
// FileName:PathHelper
// CreateBy:DragonXiong
// CreateDate:2010-01-08
// Description:
//		Class PathHelper,Used to get Path of URL
//      
// Modify Log:
//	
// Copyright:ASL-MIS
/////////////////////////////////////////////////////////////////////////

using System;
using System.Collections;
using System.Web;

namespace Auto.Web.Common
{
    /// <summary>
    /// Get the File Path
    /// </summary>
    public class PathHelper
    {
        static string appPath =HttpContext.Current.Request.ApplicationPath;
        static string filePath = HttpContext.Current.Request.FilePath;
        static string url = string.Empty;

        /// <summary>
        /// Get the Virtual URL
        /// </summary>
        public static string URL
        {
            get
            {
                if (appPath.Length == 1)
                {
                    url = filePath.Substring(1);
                }
                else
                {
                    url = filePath.Substring(appPath.Length + 1);
                }
                return url;
            }

        }


    }
}
